#ifndef __DxInput__
#define __DxInput__

#include "dinput.h"
#include "Infomation.h"
#define BUTTON_DOWN(obj, button) (obj.rgbButtons[button] & 0x80)
enum { NONE=0,
LEFT_ARROW,
RIGHT_ARROW,
CIRCLE
};

class CDxInput
{
private:

	char _keys[256];
	char _oldKeys[256];
	LPDIRECTINPUT8 _directInput;
	LPDIRECTINPUTDEVICE8 _dxMouse;
	LPDIRECTINPUTDEVICE8 _dxKeyboard;

public:
	long _mouse_X;
	long _mouse_Y;
	DIMOUSESTATE _mouseState;
	CDxInput();
	~CDxInput();
	bool Init_DirectInput(HINSTANCE,HWND);
	bool Init_Keyboard(HWND);
	bool Init_Mouse(HWND);
	void Pool_Keyboard();
	int OnKeyDown(int);
	int OnKeyPress(int);
	int OnKeyUp(int);
	long Mouse_X();
	long Mouse_Y();
	void ReAcquireInputStateWhenLost();


	void Pool_Mouse();
	int Mouse_Button(int);

};
#endif